package experiments;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

import nosql.MysqlConnector;
import nosql.query.NosqlStatement;

import experiments.data.DataGenerator;

/**
 * Main class of experiments.
 * @author yjian004
 *
 */
public class Experiments {
	
	private String urlPrefix;
	private String username;
	private String password;
	private MysqlConnector connector;
	private NosqlStatement statement;
	
	public Experiments(String urlPrefix, String username, String password){
		this.urlPrefix = urlPrefix;
		this.username = username;
		this.password = password;
	}
	
	public void generateData(){
		try{
			String path = "C:/Source/NosqlDQF/src/datasets";
			DataGenerator generator = new DataGenerator(path, urlPrefix, username, password);
			generator.generateWideTables();
			generator.generateTripleTable();
		}catch(Exception e){
			e.printStackTrace();
		}
	}
	
	public static void main(String[] args) throws Exception{
		String urlPrefix = "jdbc:mysql://localhost:3306/";
		String username = "root";
		String password = "123456";
		
		Experiments experiments = new Experiments(urlPrefix, username, password);
		experiments.generateData();
	}
}
